 
	var scope;
	var http;
	function menuController($scope, $http){
		scope = $scope;
		http = $http;
		$scope.mainShow=true;
		
		include_js("js/user.js");
		include_js("js/course.js");
		include_js("js/info.js");
		include_js("js/fileUpload.js");
		include_js("js/chat.js");
		
		
		$scope.toggleMenu = function($where){ 
			if($where == 'accMan'){
				shutAllPages($scope);
				shutOthers($scope);
				$scope.accManShow=true; 
			}else if($where == 'main'){
				shutAllPages($scope);
				shutOthers($scope);
				$scope.mainShow=true;  
			}else if($where == 'inbox'){
				shutAllPages($scope);
				shutOthers($scope);
				$scope.inboxShow=true;  
			}else if($where == 'postbox'){
				shutAllPages($scope);
				shutOthers($scope);
				$scope.postboxShow=true;  
			}  else if($where == 'userInfo'){
				shutAllPages($scope);
				shutOthers($scope);
				$scope.userInfoShow=true;  
			} else if($where == 'sendInfo'){
				shutAllPages($scope);
				shutOthers($scope);
				$scope.sendInfoShow=true;  
			}else if($where == 'mainInInfoShow'){
				shutAllPages($scope);
				shutOthers($scope);
				$scope.mainInInfoShow=true;  
			}else if($where == 'mainInPostfoShow'){
				shutAllPages($scope);
				shutOthers($scope);
				$scope.mainPostInfoShow=true;  
			}else if($where == 'mainChatShow'){
				shutAllPages($scope);
				shutOthers($scope);
				$scope.mainChatShow=true;  
			}else if($where == 'changeInfoShow'){
				shutAllPages($scope);
				shutOthers($scope);
				$scope.changeInfoShow=true;  
			}
		}
		
		$scope.changePer = function(){
			if( $scope.per == null ){				
				$http.post("GetPerInfo.action").success(function(response) {
					$scope.per = response;
				});
			}
			
			
			
		};		
		
		$scope.chagePage = function(page){
			$http.post("ChangePage.action?pageName=" + page).success(function(response) {
				window.location.reload();
			});
		};

		
	};
	
	
	function checkController($scope){
		$scope.checkAllAccount = function(){
			var checkedOfAll = $("#selectAllAccount").prop("checked");
			$("input[name='userbox']").prop("checked",checkedOfAll);
		}

		$scope.checkAllCourse = function(){
			var checkedOfAll = $("#selectAllCourse").prop("checked");
			$("input[name='coursebox']").prop("checked",checkedOfAll);
		}
		
		$scope.checkAllInInfo = function(){
			var checkedOfAll = $("#selectAllInInfo").prop("checked");
			$("input[name='inInfobox']").prop("checked",checkedOfAll);
		}
		
		$scope.checkAllPostInfo = function(){
			var checkedOfAll = $("#selectAllPostInfo").prop("checked");
			$("input[name='postInfobox']").prop("checked",checkedOfAll);
		}
	}